package io.terminus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

/**
 * 员工表
 *
 * @author Melo
 * @TableName("tbl_employee")被全局参数mybatis-plus.global-config.db-config.table-prefix代替
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ToString
@EqualsAndHashCode
public class Employee {

    /**
     * 物理主键
     *
     * IdType.AUTO可以被全局参数mybatis-plus.global-config.db-config.id-type代替
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 姓名
     */
    @TableField(value = "last_name", exist = true, condition = SqlCondition.LIKE)
    private String lastName;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 性别
     */
    private Integer gender;

    /**
     * 年龄
     */
    private Integer age;
}
